﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using OracleDbTool;

namespace hkjc
{
    static class Program
    {
        public static string LastErrorMsg;
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            OrclFunc.OpenLocalConnection("Data Source=XE;User ID=gxl;Password=andy;");
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new Form1());
            //string sql = Form1.LoadSql("VIEW_TEST");
            //Application.Run(new FormTab("",sql, "qin_y_diff", "q_odds", "w_odds1", "w_odds2", "qin_y", "qin_diff"));
            Application.Run(new FormHK());
        }

        public static string LoadSql(string sqlname)
        {
            string sql = OrclFunc.ExecuteScalarStrLocal(string.Format("select t.str||t.str2 from t_string_base t where t.id = '{0}'", sqlname));
            return sql;
        }
    }
}
